<?php
// +----------------------------------------------------------------------
// | 商城模块
// +----------------------------------------------------------------------

namespace app\mall\validate;

use think\Validate;

/**
 * 商户验证器
 * @package app\mall\validate
 */
class Merch extends Validate
{
    // 定义验证规则
    protected $rule = [
        'merch_name|商户全称'   => 'require|unique:mall_merch,merch_name|length:4,20',
		'short_name|商户简称'   => 'require|unique:mall_merch,short_name|length:2,10',
		// 'appid|微信公众号APPID'   => 'length:0,32',
		'wxpay_id|微信支付商户号'   => 'require|length:8,16',
		// 'alipay_id|支付宝商户号'   => 'requireWithout:wxpay_id|length:0,24',
		// 'alipay_token|支付宝授权码'   => 'requireWith:alipay_id|length:8,64',
		// 'nickname|负责人姓名'   => 'length:2,6|chsAlpha',
		// 'mobile|手机号'   => 'mobile',
		// 'password|密码'   => 'alphaDash',
		// 'repassword|重复密码'   => 'requireWith:password|confirm:password',
		// 'user_id|客户经理'   => 'require',
    ];
}
